package com.koyi0000.mq.rabbit.controller;

import com.koyi0000.mq.BO.User;
import com.koyi0000.mq.constant.enums.UserEnum;
import com.koyi0000.mq.service.TestSqlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author koyi0000
 * Description  Date 2020/9/15 15:50
 **/
@RestController
@RequestMapping(value = "/test/sql")
public class TestSqlController {


    @Autowired
    private TestSqlService testSqlService;

    @RequestMapping(value = "/testSql", method = RequestMethod.POST)
    public void  test1() {
        User user = new User();
        user.setUserName("koyi0000");
        user.setGender(UserEnum.GenderEnum.MALE.getTag());
        user.setAge(20);
        this.testSqlService.testSql(user);

    }
}
